package com.example.service;

import com.example.entity.Article;
import com.example.entity.Type;
import com.example.entity.vo.ArticleVo;
import com.example.entity.vo.SearchVO;

import java.util.List;

public interface ArticalService {
    //根据文章id查询文章详情
    Article QueryArticalById(Long articleId);

    //查询个人热门文章
    List<ArticleVo> QueryArticalByUserId(Long userId);

    //查询个人全部文章
    List<Article> QueryAllArticalByUserId(Long userId);

    //返回时间差值
//    int differTime(Long articleId);

    //模糊查询文章
    List<Article> queryArticalByBlur(String str);

    //新增文章
    int addArticle(Article article);

    //判断点赞
    int isLieks(Long userId ,Long articalId);
    //添加点赞数
    int addLikes(Long userId ,Long articalId);

    //取消赞
    int reduceLikes(Long userId,Long articleId);
     //查询热门文章
    List<Article> queryHotArtical(long type);

    List<Type> queryType();

    List<Article> queryHotTitle();

    List<Article> SearchByKey(String key);


    //判断收藏
    int isCollect(Long userId,Long authorId);

    // 查找该用户收藏的文章
    List<Article> queryColletedByUserId(long userId);

    //取消收藏
    int updateColletion(long userId, long articleId);

    //收藏文章
    int addColletion(long userId, long articleId);

    //  删除文章
    int deleteById(long id);
}
